How to combine filters and facetFilters using boolean operators.
OR
: must match any of the combined conditionsAND
: must match all the combined conditionsNOT
: negates a filter(
and )
to combine several OR conditions.
These rules apply:
A OR (B AND C) OR (D AND E)
isn’t allowed(A AND (B OR C))
and (A AND B)
aren’t allowed.NOT (filter1 OR filter2)
isn’t allowed.A AND (B OR C)
(A OR B) AND C
A AND (B OR C) AND (D OR E)
A AND B AND (C OR D) AND (E OR F)
(A OR B) AND (C OR D) AND E
(category:Book OR category:Ebook) AND NOT author:"JK Rowling"
price:10 TO 50 AND (category:Electronics OR category:Accessories)
inStock:true AND (category:Phones OR category:Tablets) AND (brand:Apple OR brand:Samsung) AND price>500
OR
.
For example, num=3 OR tag1 OR facet:value
isn’t allowed.
((category:Electronics OR category:Home) AND NOT brand:LG) AND NOT price:100 TO 500
and the user selects the Electronics category, the expression simplifies to (category:Electronics AND NOT brand:LG) AND NOT price:100 TO 500
.